import java.util.Scanner;

/**
 * @author: gao
 * @create-date: 2025/3/30 19:48
 */

public class Solution {
    public int findPoisonedDuration(int[] timeSeries, int duration) {
        int ret = 0;
        for (int i = 1; i < timeSeries.length; i++) {
            int x = timeSeries[i] - timeSeries[i - 1];
            if (x >= duration) ret += duration;
            else ret += x;
        }
        return ret + duration;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) {
            int len = in.nextInt();
            int[] timeSeries = new int[len];
            for (int i = 0; i < len; i++) {
                timeSeries[i] = in.nextInt();
            }
            int duration = in.nextInt();
            Solution solution = new Solution();
            System.out.println(solution.findPoisonedDuration(timeSeries, duration));
        }
    }
}